package com.love.rongcommon.base.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.love.rongcommon.base.converter.Convert;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class BaseResponse implements Convert, Serializable {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(position = 1, value = "编号")
    private Long id;

    @ApiModelProperty(position = 2, value = "是否可用（1：是；0：否）")
    private Boolean enable;

    @ApiModelProperty(position = 3, value = "状态（0：默认）")
    private Integer status;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(position = 4, value = "创建时间")
    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(position = 5, value = "更新时间")
    private LocalDateTime updateTime;
}
